package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 第三方设备子表 实体类
 * 表名：ra_third_child
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_third_child")
public class RaThirdChild implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 设备主键
     */
    @Column(name = "third_device_id")
    private Long thirdDeviceId;
    
    /**
     * 位号
     */
    @Column(name = "bit_no", length = 128)
    private String bitNo;
    
    /**
     * 第三方设备ID
     */
    @Column(name = "third_node_id", length = 64)
    private String thirdNodeId;
    
    /**
     * 层级等级
     */
    @Column(name = "level_grade")
    private Byte levelGrade;
    
    /**
     * OPC位号主键
     */
    @Column(name = "opc_tags_id")
    private Long opcTagsId;
    
    /**
     * 描述
     */
    @Column(name = "alarm_desc", length = 65535)
    private String alarmDesc;
    
    /**
     * 报警类型
     */
    @Column(name = "alarm_type", length = 128)
    private String alarmType;
    
    /**
     * 报警条件
     * 默认值: 0
     */
    @Column(name = "alarm_condition")
    private Byte alarmCondition;
    
    /**
     * 报警数值
     */
    @Column(name = "alarm_numeric", length = 64)
    private String alarmNumeric;
    
    /**
     * 关联措施主键
     */
    @Column(name = "measure_id")
    private Long measureId;
    
    /**
     * 报警设置状态（0、未设置 1、已设置）
     * 默认值: 0
     */
    @Column(name = "alarm_setting_status")
    private Byte alarmSettingStatus;
    
    /**
     * 单位描述
     */
    @Column(name = "unit_desc", length = 128)
    private String unitDesc;
    
    /**
     * 租户主键
     */
    @Column(name = "tenant_id")
    private Integer tenantId;
    
    /**
     * 采集状态（0、未采集 1、正常 2、失败）
     * 默认值: 0
     */
    @Column(name = "collect_status")
    private Byte collectStatus;
    
    /**
     * 采集信息
     */
    @Column(name = "collect_json", length = 128)
    private String collectJson;
    
    /**
     * 模拟状态（0、关闭1、开启）
     */
    @Column(name = "simulate_status")
    private Byte simulateStatus;
    
    /**
     * 状态（0、关闭 1、开启）
     * 默认值: 0
     */
    @Column(name = "status")
    private Byte status;
    
    /**
     * 是否删除（0、否1、是）
     * 默认值: 0
     */
    @Column(name = "is_del", nullable = false)
    private Byte isDel;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time", nullable = false)
    private java.time.LocalDateTime createTime;
    
    /**
     * 创建者
     */
    @Column(name = "create_by", length = 64)
    private String createBy;
    
    /**
     * 更新时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "update_time", nullable = false)
    private java.time.LocalDateTime updateTime;
    
    /**
     * 更新者
     */
    @Column(name = "update_by", length = 64)
    private String updateBy;
    
    @Override
    public String toString() {
        return "RaThirdChild{" +
            "id=" + id +
            ", thirdDeviceId=" + thirdDeviceId +
            ", bitNo=" + bitNo +
            ", thirdNodeId=" + thirdNodeId +
            ", levelGrade=" + levelGrade +
            ", opcTagsId=" + opcTagsId +
            ", alarmDesc=" + alarmDesc +
            ", alarmType=" + alarmType +
            ", alarmCondition=" + alarmCondition +
            ", alarmNumeric=" + alarmNumeric +
            ", measureId=" + measureId +
            ", alarmSettingStatus=" + alarmSettingStatus +
            ", unitDesc=" + unitDesc +
            ", tenantId=" + tenantId +
            ", collectStatus=" + collectStatus +
            ", collectJson=" + collectJson +
            ", simulateStatus=" + simulateStatus +
            ", status=" + status +
            ", isDel=" + isDel +
            ", createTime=" + createTime +
            ", createBy=" + createBy +
            ", updateTime=" + updateTime +
            ", updateBy=" + updateBy +
        '}';
    }
} 